<template>
	<view>
		<x-color-picker v-model="selectedColor" @confirm="onColorConfirm"
			@cancel="onColorCancel" />
	</view>
</template>

<script>
	export default {
		data() {
			return {
				selectedColor: '#1B73CC'
			}
		},
		methods: {
			onColorConfirm(color) {
				console.log('确认选择:', color.hex)
				uni.$emit("checkColor",color.hex)
				uni.navigateBack(1)
			},
			onColorCancel() {
				console.log('取消选择')
			}
		}
	}
</script>

<style>

</style>